package org.biz.modules.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.biz.modules.entity.SysRole;

import java.util.List;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 */
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {


    @Select("select r.*,ur.auth  from sys_role r\n" +
            "join sys_user_role ur on ur.role_id =r.id \n" +
            "where ur.user_id=#{userId}")
    List<SysRole> getRoleListByUserId(@Param("userId") String userId);



}
